'use strict';

/**
 * @ngdoc function
 * @name consoleAngularUiApp.service:service
 * @description
 * # ServService
 * Cloud Services service of the consoleAngularUiApp
 */
angular.module('consoleAngularUiApp').factory('$servicesServ', ['$resource', function($resource){

	return $resource('/api/rest/rprm/cloudservices/:id', {id: '@serviceId'}, {
		query: {
			isArray: true,
			headers: {
				'Accept': 'application/vnd.plcm.plcm-service-list+json'
			}
		},
		deploy: {
			method: 'POST',
			headers: {
				'Content-Type': 'application/vnd.plcm.plcm-service+json'
			}
		},
		update: {
			method: 'PUT',
			headers: {
				'Content-Type': 'application/vnd.plcm.plcm-service+json'
			}
		},
		start: {
			method: 'POST',
			url: this.url + '/start'
		},
		stop: {
			method: 'POST',
			url: this.url + '/stop'
		}
	});

}])